1. Field of the Invention
The present invention relates to a distance measuring apparatus and a camera comprising the same.
2. Description of the Related Art
In a distance measuring apparatus (a passive autofocusing (AF) system distance measuring apparatus, for example) that is capable of obtaining a plurality of distance measurement values, and that determines autofocus data (a parameter for adjusting a plane to be brought into focus by autofocus means) based on the plurality of distance measurement values obtained, it is common to use the shortest distance data selected among a plurality of obtained distance measurement values as the autofocus data without further processing, or to set the mean value of the distance measurement values as the autofocus data. The distance measuring apparatus of the camera disclosed in Japanese Patent Application Laid-open No. 5-188276, for example, switches between using the mean value of the distance measurement values, and using the shortest distance depending on the magnitude of the shortest distance in comparison with a predetermined threshold value.
However, according to the above-mentioned distance measuring apparatus, because the decision between using shortest distance data and mean value is made based on the magnitude of the shortest distance and the predetermined threshold value, following inconveniences occur, for example.
When many distance measurement values 210f (background and the like) corresponding to greater distances are included as in FIG. 11, in case where the distance measurement value 210n (people and the like) of a short distance is farther than the predetermined threshold distance, the mean distance 210A (farther away from people and the like) is chosen, thereby increasing the deviation from the true distance (people and the like).
On the other hand, it is not possible to appropriately calculate the autofocus data so as to photograph with good results close-up shots of the faces of people, or other objects such as flowers that have disparate positions at short distance. Specifically, when close-up shots of the faces of people are made at a short distance as in FIG. 12, the focus matches the nose position 220g at a short distance, thus although the nose 220n is accurately focused, the ears 220f become a blur.
In view of the above, it is an object of the present invention to solve the above-stated problems and to provide a distance measuring apparatus capable of calculating autofocus data so that an excellent focal point can be obtained based on a plurality of distance measuring data, and to provide a camera comprising the same.
To solve the above-stated problems, the distance measuring apparatus of the present invention has a plurality of distance measuring regions and calculates autofocus data on the basis of a plurality of distance measurement values acquired in the plurality of distance measuring regions, the distance measuring apparatus comprising: distance measurement value selecting means for detecting the shortest distance measurement value corresponding to the shortest distance among the plurality of distance measurement values, and selecting the distance measurement values which differ from the shortest distance measurement value by a value less than a predetermined threshold value; first computing means for calculating a first correction value, which is the mean value of the difference values between the shortest distance measurement value and the selected distance measurement values; second computing means for detecting the farthest distance measurement value corresponding to the farthest distance among the selected distance measurement values, and calculating a second correction value, which is xc2xd the difference between the shortest distance measurement value and the farthest distance measurement value; and third computing means for calculating the autofocus data by correcting the shortest distance measurement value, using the first correction value as the adopted correction value if the second correction value is greater than the first correction value, and the second correction value as the adopted correction value if the second correction value is less than the first correction value.
According to the distance measuring apparatus of the present invention, processing is performed as described below without simply adopting the shortest distance measurement value, or simply adopting the mean value of the distance measurement values, or switching between the mean value of the distance measurement values and the shortest distance measurement value on the basis of the results of the shortest distance measuring distance.
Specifically, distance measurement values within a predetermined range from the shortest distance are selected and, based on whether points of the selected distance measurement values are (1) biased to the nearest side or (2) biased to the farthest side in the predetermined range from the shortest distance, either (1) the mean value of the difference of the selected distance measurement values from the shortest distance measurement value, or (2) xc2xd of the difference between the shortest distance measurement value and the farthest distance measurement value among the selected distance measurement values is chosen as the adopted correction value, and the shortest distance measurement value is corrected by means of the adopted correction value toward the far side to calculate autofocus data. Therefore, autofocus data can be calculated in an appropriate manner without the autofocus data being excessively corrected on the basis of the shortest distance measurement value, or being set to the shortest distance when correction is required.
The above-stated predetermined range, when expressed as a distance measurement value (substantially equivalent to the inverse of the distance 1/L), is substantially the same value irrespective of the results for the shortest distance, however, when expressed as a distance value (unit: meter), the range differs depending on the results for the shortest distance in which the distance value of the predetermined range decreases as the shortest distance comes nearer, and the distance value of the predetermined range increases as the shortest distance moves farther away. This is because the distance measurement value has a substantially proportional relationship with the inverse of the distance.
Preferably, the predetermined threshold value of the distance measuring apparatus of the present invention is variable.
The camera of the present invention comprises the distance measuring apparatus described above, wherein the predetermined threshold value varies based on a circle of confusion.
According to the camera of the present invention, because only distance measurement values in which the circles of confusion (when the plane to be brought into focus is set at the shortest distance) are used in the calculation of the autofocus data, all of the selected distance measurement values would be within the acceptable range of the circle of confusion even when the autofocus data is to be maximally corrected. Thus, it is possible to set the desired plane to be brought into focus such that the circles of confusion formed by both the shortest point and the farthest point are within favorable range.